﻿
Partial Class identification
    Inherits System.Web.UI.Page

    Protected Sub BtnConnect_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnConnect.Click

        Dim Securite As New ResaSecurite.user
        Securite.Url = Application("ResaUser")
        Securite.Timeout = 60000

        Dim ResaLog As New ResaSurvey.logsurvey
        ResaLog.Url = Application("ResaLog")
        ResaLog.Timeout = 60000

        Dim resultat As New System.Xml.XmlDocument
        Dim xmlnode As System.Xml.XmlNode
        Dim elementa As System.Xml.XmlElement
        resultat.LoadXml("<USERINFO></USERINFO>")
        Try
            For Each xmlnode In Securite.GetUserFullInfo(TextBoxId.Text, TextBoxPwd.Text).ChildNodes
                elementa = resultat.CreateElement(xmlnode.Name)
                elementa.InnerText = xmlnode.InnerText
                resultat.DocumentElement.AppendChild(elementa)
            Next
            Session("ID") = TextBoxId.Text
            Session("PWD") = TextBoxPwd.Text
            resultat.Save(Server.MapPath("") + "/test.xml")
            Session("INFOUSER") = resultat
            Response.Redirect("ADM.aspx")
        Catch ex As Exception
            TextBoxId.Text = ""
            TextBoxPwd.Text = ""
        End Try
    End Sub
End Class

